<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
<!doctype html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible"
          content="IE=9; IE=8; IE=7; IE=EDGE">
<meta charset="utf-8" />

    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta content="telephone=no" name="format-detection"/>
    <meta name="viewport" content="initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
<title>登录管理中心</title>
	<link rel="shortcut icon" href="<?php echo URLPRE;?>static/public/images/site.ico" mce_href="<?php echo URLPRE;?>static/public/images/site.ico" type="image/x-icon">

	<script type="text/javascript" src="<?php echo URLPRE;?>static/public/js/jquery/jquery-1.11.1.min.js"></script>
	<script type="text/javascript" src="<?php echo URLPRE;?>static/public/js/device.js"></script>
	<script type="text/javascript"
			src="<?php echo URLPRE; ?>static/template/<?php echo MOBILE_TEMPLATE_NAME ?>/mobile/js/layer/layer.js"></script>

	<link href="<?php echo URLPRE;?>static/login/pad.css" rel="stylesheet" />

	<!-- 阿里字体-->
	<link href="<?php echo URLPRE;?>static/public/iconfont/iconfont.css" rel="stylesheet" />


	<script type="text/javascript">

		if (window.parent !== window.self) {
			document.write = '';
			window.parent.location.href = window.self.location.href;
			setTimeout(function () {
				document.body.innerHTML = '';
			}, 0);
		}

	</script>
		<?php if(check_wap()):?>
	<script type="text/javascript">

	if (window.parent !== window.self) {
		document.write = '';
		window.parent.location.href = window.self.location.href;
		setTimeout(function () {
			document.body.innerHTML = '';
		}, 0);
	}


	var mql = window.matchMedia("(orientation: portrait)");
	// 如果有匹配，则我们处于垂直视角
	if(mql.matches) {
	// 直立方向
		$(function () {
			$.extend({cover_layer:function () {
				var html = '<div id="js-cover-layer" style="pointer-events: auto;position: absolute;top: 0;left: 0;width: 100%;height: 100%;z-index:9998; background-color:#000; opacity:0.6; filter:alpha(opacity=30);"></div>';
				$('body').append(html);
			}})

			$.cover_layer();
		})

		$(function () {
			layer.msg('亲，请将您的屏幕调整为横屏，么么哒 ^_^ ',{
				icon: 2,
				time: 3600000 //2秒关闭（如果不配置，默认是3秒）
			});

		})
	}


	// 添加一个媒体查询改变监听者
	mql.addListener(function(m) {
		if (m.matches) {

			$(function () {
				$.extend({cover_layer:function () {
					var html = '<div id="js-cover-layer" style="pointer-events: auto;position: absolute;top: 0;left: 0;width: 100%;height: 100%;z-index:9998; background-color:#000; opacity:0.6; filter:alpha(opacity=30);"></div>';
					$('body').append(html);
				}})

				$.cover_layer();
			})

			$(function () {
				layer.msg('亲，请将您的屏幕调整为横屏，么么哒 ^_^ ',{
					icon: 2,
					time: 3600000 //2秒关闭（如果不配置，默认是3秒）
				});

			})
		}
		else {

			$(function () {
				layer.msg('已经调整好啦，尽情使用吧 ^_^ ',{
					icon: 1,
					time: 2000 //2秒关闭（如果不配置，默认是3秒）
				});

			})
			$('#js-cover-layer').remove();
		}
	});

	</script>
	<?php endif;?>


	<script>

	<?php if(!check_wap()):?>




    $(function () {


        if (localStorage.showAnnounce == undefined || localStorage.showAnnounce == 0) {
            localStorage.showAnnounce = parseInt(Math.random() * 40, 10) + 1;

        } else {

            if (localStorage.showAnnounce == 42) {
                localStorage.showAnnounce = 0;
            }
            localStorage.showAnnounce = Number(localStorage.showAnnounce) + 1;
        }

        var wURl = '<?php echo URLPRE;?>static/login/wrapper/';
        var iUrl = wURl + localStorage.showAnnounce + '.jpg';

        $('body').append('<img src="' + iUrl + '" id="js-image-wrap" style="display: none">');
        $('#js-image-wrap').load(function () {
            $('body').css({
                "background": "#fdf8f4 url(" + iUrl + ") center  no-repeat",
                "background-size": "100% "
            });
        })
    })

	<?php else: ?>
	
	$(function () {
		var wURl = '<?php echo URLPRE;?>static/login/wrapper/';
		var iUrl = wURl + '24.jpg';

		$('body').append('<img src="' + iUrl + '" id="js-image-wrap" style="display: none">');
		$('#js-image-wrap').load(function () {
			$('body').css({
				"background": "#fdf8f4 url(" + iUrl + ") no-repeat",
				"background-size": "cover"
			});
		})
	})
	<?php endif;?>

	</script>

</head>
<body>

<div class="wrap">
  <div class="inner">
    <div class="header">
		<h1> <i class="icon iconfont">&#xe681;</i></h1>
    </div>
    <div class="qzone_login clearfix">
      <!-- end qzone_cont -->
      <div class="login_main">

        <form id="loginform" method="post" name="loginform" action="<?php echo $login_url;?>">
          <ul class="login_list"  id="web_login">
            <li class="login_input">
              <input id="u" name="username" class="input_txt" tabindex="1" type="text" value="" placeholder="请输入帐号名" title="帐号名"  />
            </li>
            <li class="login_input">
              <input maxlength=16 type="password" id="p" name="password" tabindex="2" class="input_txt" type="text" value=""  placeholder="请输入密码" title="密码"/>
            </li>
			  <li class="login_input">
                  <button class="login_btn " >登录</button>
			  </li>

          </ul>
        </form>
        <div class="quick_login" id="qlogin"> </div>
      </div>
    </div>

  </div>
</div>
<div class="footer">
  <div class="inner">
    <div class="copyright clearfix" style="text-align: center">
      <p class="copyright_1en">Copyright &copy; 2012 - <?php echo date('Y',now());?> , 微农家网络科技版权所有.</p>
    </div>
  </div>
</div>


</body>
</html>